﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>
<%@ Register TagPrefix="recaptcha" Namespace="Recaptcha" Assembly="Recaptcha" %>

<asp:Content ID="loginTitle" ContentPlaceHolderID="TitleContent" runat="server">Sqwarea: Register</asp:Content>

<asp:Content ID="loginContent" ContentPlaceHolderID="MainContent" runat="server">
    <h1>Register</h1>   
    <p>
        Please fill in the following informations:
    </p>
    <%= Html.ValidationSummary("Login was unsuccessful. Please correct the errors and try again.") %>

    <% using (Html.BeginForm()) { %>
      <fieldset>
        <legend>Account Information</legend>
        <% if (((List<string>)ViewData["Messages"]).Count > 0) { %>
        <ul class="Message">
          <% foreach(var message in ((List<string>)ViewData["Messages"]) ) { %>
            <li><%= message %></li>
	      <% } %>
        </ul>
        <% } %>
        <p>
          <label for="nickname">Nickname:</label>
          <%= Html.TextBox("nickname", ViewData["Nickname"])%>
        </p>
        <p>
          <label for="email">Email:</label>
          <%= Html.TextBox("email", ViewData["Email"])%>
        </p>
        <p>
           <label for="username">Language:</label>
           <%= Html.DropDownList("language", (IEnumerable<SelectListItem>) ViewData["Languages"], ViewData["Language"])%>
        </p>
        <p>
            <label for="human">Only human beings, seahorses and
            <a href="http://en.wikipedia.org/wiki/Kiwi">kiwi</a> are allowed.
            In particular, bots are not welcome:</label>
            <recaptcha:RecaptchaControl
                ID="recaptcha"
                runat="server"
                PublicKey="6LdLgQwAAAAAAHCQb92XW3qNVFilyOGTcOn5u22E"            
                PrivateKey="6LdLgQwAAAAAADcr5ptAGOUpoTNlE4OQHN07BqwK"
            />
        </p>
        <p class="formButtons">
          <input type="submit" value="Register" />
        </p>
      </fieldset>
    <% } %>
</asp:Content>
